Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2d1a91d2eb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex please review |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
src/utils/TransactionUtils.ts
Outdated
| } | ||
|
|
||
| export async function willSucceed(transaction: AugmentedTransaction): Promise<TransactionSimulationResult> { | ||
| applySwapApiCalldataMarkerInPlace(transaction); |
There was a problem hiding this comment.
Do we have to put this in willSucceed? This seems incorrect since now every time we simulate we are tagging data with swapAPI calldata, which normally is fine but breaks anything which actually looks at msg.data, which I imagine is broad enough to potentially cause unforseen simulation issues.
There was a problem hiding this comment.
That is, we really should limit this to only specific transactions. You can e.g. conditionally add this if the calldatamarker in the augmented transaction is defined.
There was a problem hiding this comment.
hmm, but we are already checking if the marker is defined in AugmentedTransaction object at the beginning of applySwapApiCalldataMarkerInPlace
This change will allow us to specify if we want to tag the tx with SwapAPI marker and append that marker in TransactionClient before trying to send it.
INFO: This isn't tested fully yet!